3.2521 \(\int x^{-1+n} (a+b x^n) \, dx\)

Optimal. Leaf size=22 \[ \frac {a x^n}{n}+\frac {b x^{2 n}}{2 n} \]

[Out]

a*x^n/n+1/2*b*x^(2*n)/n

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 22, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.077, Rules used = {14} \[ \frac {a x^n}{n}+\frac {b x^{2 n}}{2 n} \]

Antiderivative was successfully verified.

[In]

Int[x^(-1 + n)*(a + b*x^n),x]

[Out]

(a*x^n)/n + (b*x^(2*n))/(2*n)

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rubi steps

\begin {align*} \int x^{-1+n} \left (a+b x^n\right ) \, dx &=\int \left (a x^{-1+n}+b x^{-1+2 n}\right ) \, dx\\ &=\frac {a x^n}{n}+\frac {b x^{2 n}}{2 n}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 19, normalized size = 0.86 \[ \frac {x^n \left (2 a+b x^n\right )}{2 n} \]

Antiderivative was successfully verified.

[In]

Integrate[x^(-1 + n)*(a + b*x^n),x]

[Out]

(x^n*(2*a + b*x^n))/(2*n)

________________________________________________________________________________________

fricas [A]  time = 0.76, size = 19, normalized size = 0.86 \[ \frac {b x^{2 \, n} + 2 \, a x^{n}}{2 \, n} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1+n)*(a+b*x^n),x, algorithm="fricas")

[Out]

1/2*(b*x^(2*n) + 2*a*x^n)/n

________________________________________________________________________________________

giac [A]  time = 0.15, size = 19, normalized size = 0.86 \[ \frac {b x^{2 \, n} + 2 \, a x^{n}}{2 \, n} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1+n)*(a+b*x^n),x, algorithm="giac")

[Out]

1/2*(b*x^(2*n) + 2*a*x^n)/n

________________________________________________________________________________________

maple [A]  time = 0.02, size = 25, normalized size = 1.14 \[ \frac {a \,{\mathrm e}^{n \ln \relax (x )}}{n}+\frac {b \,{\mathrm e}^{2 n \ln \relax (x )}}{2 n} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^(n-1)*(b*x^n+a),x)

[Out]

a/n*exp(n*ln(x))+1/2*b/n*exp(n*ln(x))^2

________________________________________________________________________________________

maxima [A]  time = 0.58, size = 17, normalized size = 0.77 \[ \frac {{\left (b x^{n} + a\right )}^{2}}{2 \, b n} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1+n)*(a+b*x^n),x, algorithm="maxima")

[Out]

1/2*(b*x^n + a)^2/(b*n)

________________________________________________________________________________________

mupad [B]  time = 1.24, size = 15, normalized size = 0.68 \[ \frac {x^n\,\left (a+\frac {b\,x^n}{2}\right )}{n} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^(n - 1)*(a + b*x^n),x)

[Out]

(x^n*(a + (b*x^n)/2))/n

________________________________________________________________________________________

sympy [A]  time = 1.59, size = 22, normalized size = 1.00 \[ \begin {cases} \frac {a x^{n}}{n} + \frac {b x^{2 n}}{2 n} & \text {for}\: n \neq 0 \\\left (a + b\right ) \log {\relax (x )} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**(-1+n)*(a+b*x**n),x)

[Out]

Piecewise((a*x**n/n + b*x**(2*n)/(2*n), Ne(n, 0)), ((a + b)*log(x), True))

________________________________________________________________________________________